WIFI_RTL8192FS_SITE_METHOD = git
WIFI_RTL8192FS_SITE = https://github.com/gtxaspec/wifi-rtl8192fs
WIFI_RTL8192FS_SITE_BRANCH = master
WIFI_RTL8192FS_VERSION = c25ba6d3d861de9eaa84ce1fb4e352cf7afb3629
# $(shell git ls-remote $(WIFI_RTL8192FS_SITE) $(WIFI_RTL8192FS_SITE_BRANCH) | head -1 | cut -f1)

WIFI_RTL8192FS_LICENSE = GPL-2.0
WIFI_RTL8192FS_LICENSE_FILES = COPYING

WIFI_RTL8192FS_MODULE_MAKE_OPTS = \
	CONFIG_RTL8192FS=m

define WIFI_RTL8192FS_LINUX_CONFIG_FIXUPS
	$(call KCONFIG_ENABLE_OPT,CONFIG_WLAN)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WIRELESS_EXT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_CORE)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_PROC)
	$(call KCONFIG_ENABLE_OPT,CONFIG_WEXT_PRIV)
	$(call KCONFIG_SET_OPT,CONFIG_CFG80211,y)
	$(call KCONFIG_SET_OPT,CONFIG_MAC80211,y)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_MINSTREL)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_MINSTREL_HT)
	$(call KCONFIG_ENABLE_OPT,CONFIG_MAC80211_RC_DEFAULT_MINSTREL)
	$(call KCONFIG_SET_OPT,CONFIG_MAC80211_RC_DEFAULT,"minstrel_ht")
endef

define WIFI_RTL8192FS_INSTALL_CONFIGS
	$(INSTALL) -D -m 0644 $(WIFI_RTL8192FS_PKGDIR)/files/PHY_REG_PG.txt \
		$(TARGET_DIR)/lib/firmware/PHY_REG_PG.txt

	$(INSTALL) -D -m 0644 $(WIFI_RTL8192FS_PKGDIR)/files/TXPWR_LMT.txt \
		$(TARGET_DIR)/lib/firmware/TXPWR_LMT.txt
endef

WIFI_RTL8192FS_POST_INSTALL_TARGET_HOOKS += WIFI_RTL8192FS_INSTALL_CONFIGS

$(eval $(kernel-module))
$(eval $(generic-package))
